var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var r, a = arguments.length, c = a < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(t, e, o, n); else for (var u = t.length - 1; 0 <= u; u--) (r = t[u]) && (c = (a < 3 ? r(c) : 3 < a ? r(e, o, c) : r(e, o)) || c);
    return 3 < a && c && Object.defineProperty(e, o, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameData"), s = e("UIManager"), c = e("PopBackItemView"), l = cc._decorator, d = l.ccclass, u = l.property, p = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.light = null, t.numLabel = null, t;
    }
    return i(t, e), t.prototype.onLoad = function() {}, t.prototype.init = function() {
        cc.tween(this.light).repeatForever(cc.tween().by(2, {
            angle: 60
        })).start(), PD.checkNumParam("num") && (this.numLabel.string = GA.formatNumber(PD.data.num));
    }, t.prototype.callback = function() {
        var t = this;
        PD.checkNumParam("num") ? (r.GD.updateNumber("diamond", PD.data.num), s.default.getInstance().barViews.forEach(function(t) {
            return t.refresh();
        }), s.default.getInstance().showToast({
            diamond: PD.data.num
        }, function() {
            t.closePnl();
        })) : this.closePnl();
    }, a([ u(cc.Node) ], t.prototype, "light", void 0), a([ u(cc.Label) ], t.prototype, "numLabel", void 0), 
    a([ d ], t);
}(c.default);

n.default = p;